package com.zhiyou.app.shop.common.util;

import java.math.BigDecimal;
import java.util.List;

import com.zhiyou.app.shop.website.dao.pojo.Msg;
import com.zhiyou.app.shop.website.service.IMsgService;
import com.zhiyou.app.shop.website.service.IUserAccountService;
import com.zhiyou.app.shop.website.util.SpringBeanFactory;

public class BaseItemUtil {
	
	
	public static BigDecimal findTotalMoneyByAccount(String account){
		IUserAccountService userAccountService = (IUserAccountService)SpringBeanFactory.getBean("userAccountService");
		return userAccountService.getTotal(account);
	}

	public static Integer isReplyMsg(String msgId){
		IMsgService msgService = (IMsgService) SpringBeanFactory.getBean("msgService");
		List<Msg> list = msgService.findReply(msgId);
		if(list != null && list.size() > 0){
			return 1;
		}
		return 0;
	}
	
	public static String findItemByTypeAndCode(String type, String code, String flag){
		
		return "";
	}
	
	public static void main(String[] args) {
		String i = "1";
		System.out.println(i+1);
	}
}
